﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/MasterPage.master" AutoEventWireup="true"
    CodeFile="Home.aspx.cs" Inherits="Pages_Home" MaintainScrollPositionOnPostback="true" %>

<%@ Register Src="../WebControls/Product.ascx" TagName="Product" TagPrefix="fns" %>
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ListView ID="ProductsRepeter" runat="server">
        <ItemTemplate>
            <fns:Product ID="Product" runat="server" ProductID='<%#Eval("ID") %>' ProductName='<%#Eval("name") %>'
                ImageUrl='<%#Eval("image_url") %>' Price='<%#Eval("price") %>' OldPrice='<%#Eval("old_price") %>'
                Rating='<%#Eval("rating") %>' Views='<%#Eval("views") %>' IsPromotion='<%#Eval("is_promotion") %>' />
        </ItemTemplate>
        <LayoutTemplate>
            <div class="center_title_bar">
                Cele mai noi produse
            </div>
            <div id="itemPlaceholder" runat="server">
            </div>
        </LayoutTemplate>
        <EmptyDataTemplate>
            <span style="text-align: center">Nu sa gasit nici un produs</span>
        </EmptyDataTemplate>
    </asp:ListView>
    <asp:Repeater ID="ProduseRecomandate" runat="server" 
        onitemcommand="ProduseRecomandate_ItemCommand">
        <HeaderTemplate>
            <div class="center_title_bar">
                Produse Recomandate
            </div>
        </HeaderTemplate>
        <ItemTemplate>
            <fns:Product ID="Product" runat="server" ProductID='<%#Eval("ID") %>' ProductName='<%#Eval("name") %>'
                ImageUrl='<%#Eval("image_url") %>' Price='<%#Eval("price") %>' OldPrice='<%#Eval("old_price") %>'
                Rating='<%#Eval("rating") %>' Views='<%#Eval("views") %>' IsPromotion='<%#Eval("is_promotion") %>' />
        </ItemTemplate>
    </asp:Repeater>
</asp:Content>


